You can end the stun depending on how you added it.
With stunning abilities, you remove the stun by removing the buff (you cannot remove the buff while still stunning).
With Mass Teleport, you can stop the stun by removing the dummy unit or ordering it to stop.
With other stuff, like PauseUnit, you stop it by calling PauseUnit(u, false) or something like that. Same with UnitSuspend.
@Bribe, will that also work if the unit is silenced, stunned, issued orders via triggers, moves instantly and stuff like that, etc?