maintenance mode after error occurs while running update
Most housekeeping tasks like these can be done using Drush, a Drupal command line managing tool. For example, you can reinstall the module using 

drush pm-disable modulename
drush pm-uninstall modulename
drush pm-enable modulename


the database can be updated by issuing

drush updatedb


And code is easily updated with

drush pm-update


To use drush you need a shell access to a server your site runs on. No authorization as Drupal user is needed.