added logic for when a user leaves session withough unlocking rows.