Revert "#2088 LOCK not released in SQL UPDATE-PESSIMISTIC LOCK"

This reverts commit a4d9a920f0a881bfc076ccf9dbdbd3bb3053915f.