Attempt to mitigate trx deadlocks with SELECT ... FOR UPDATE
SELECT ... FOR UPDATE acquires an exclusive lock on given rows right
away, thus avoiding a transaction deadlock when two transaction with
an overlapping shared locks attempt to upgrade to an exclusive lock
in reverse order.