Consider using http://docs.sqlalchemy.org/en/rel_0_9/orm/query.html#sqlalchemy.orm.query.Query.with_for_update with the select, it allows the first reader to win the update.
Consider using http:// docs.sqlalchemy .org/en/ rel_0_9/ orm/query. html#sqlalchemy .orm.query. Query.with_ for_update with the select, it allows the first reader to win the update.