New configuration parameter `lock_max_wait`

We found ourselves in the trouble where we wanted to override the servers max_execution_time for our own value, but couldn't dot it. This PR adds support for this.