get rid of ‘locks’ dependency, use select_for_update