You should never update your phone when the power is critical, as the update process eats up a lot of juice. You might need to look at resetting your phone, or using the Windows Phone Recovery Tool to reinstall the latest firmware for your phone, then you can upgrade it once it is back on.
I would advise that you try a soft reset first to ree if it resolves the problem:
Whilst your phone is on:
Press and hold the Volume Down and Power buttons at the same time until you feel a vibration (about 10–15 seconds). Ignore the "slide down to power off" screen, or if any application like the
feedback application pops up.
After the soft reset, set your time and try upgrading again. If the problem is not resolved and the upgrade is not working, you can go on and perform a Hard Reset:
Press and hold Volume Down and Power at the same time until you feel a vibration (about 10–15 seconds). Ignore the
slide down to power off screen.
When you feel the vibration, release the buttons, and then immediately press and hold the volume down button until you see a large exclamation mark.
Once the exclamation mark appears, press the following four buttons in this order: Volume Up, Volume Down,Power and Volume Down.
Your phone should now reset and restart itself. It might take a while for the reset to finish. You should see gears/cogs turning on the display, to signify the process. It might take a while to finish.
You can check further instructions on How to perform soft and hard resets in the linked article
If all else fails, download the Windows Device Recovery Tool.