Added call from Middleware to reset timer when new query is made.
Added UnlockAll to commit and abort in Middleware to actually release the locks.