Can a plug melt when unit is not turned on?
If there is current leakage between pins of the plug, almost a short circuit, then that can happen. Turning the unit on only conducts current to the rest of the unit inside its container.

If the current leakage between the pins was higher, you would blow a fuse. You need to check the fuse, or circuit breaker, for the circuit it's plugged into because it might be too large and allowed the plug to melt.

Of course, it sounds like there is a problem with the plug itself.