MySQL over-session duration fixes