If you are performing factory upgrade, press the cancel. For other content, simply disconnect the phone from its connecting cable and everything should be fine.
However, it's not recommended to disconnect the phone during the phone upgrade or it will become unusable.