sql: parsing select with row locks ('select .. for update')