With_for_update sqlalchemy
q = sess.query(User).populate_existing().with_for_update(nowait=True, of=User)
Thoughtful Tamarin
q = sess.query(User).populate_existing().with_for_update(nowait=True, of=User)