Apple - OSX : Cancel the shutdown sequence
You can just launch any app while the Mac is shutting down and that'll terminate the process.
sudo killall shutdown
I've tried, it works.
If you have any unsaved documents the shutdown process will wait while the application prompts you to save the document, and eventually will time out. You can also click Cancel in the save dialog and shutdown process will interrupt.