Unless a custom phpbb3 function, sessionstart() =/= session_start()

Output the query and then run it in the database to see what's going on. Could be the hash is wrong.