How to lock a row over a SELECT followed by an UPDATE

Original text of this message