'Acquire an exclusive lock on the currently-loaded session data.'

def acquire_lock(self):

    self.locked = True
    self.cursor.execute('select    id    from    session    where    id=%s    for    update', (self.id,))
