[ticket/12597] Fix misplaced release of db lock

PHPBB3-12597