if you're really quick you could open a terminal window and type
sudo killall shutdown
that might work. Otherwise, quickly open an application that always asks if you really want to quit. You could use applescript to make such an application:
on quit
display dialog "Really shut down?" buttons {"No", "Yes"} default button "no"
if the button returned of the result is "Yes" then
continue quit
end if
-- If I don't continue the quit, the app will keep running.
end quit
type that into the applescript editor and save it as an application, then put it somewhere handy.
NB. Both of these methods may not work. I'm too lazy to find out if they do, because it might involve having to reboot several times.