Update update.php

Closing the lock_handle first will prevent an access denied error on windows.