#2088 LOCK not released in SQL UPDATE-PESSIMISTIC LOCK

It fixes #2088