Merge pull request #650 from blueboxgroup/fix-1.0.x-issues

Fix several small issues found in recent deploy
mysql: timeout locks every 30 minutes rather than 1 year