57227808 fix race conditions with mysql lock