[ticket/12597] Changing place of lock release in execute() method

PHPBB3-12597