For the record, mIRC already keeps track of how long a particular user has been idle on a given channel with
$nick(#,nick).idle. This should work:
ON ^*:PART:%hide.channels:if ($nick(#,$nick).idle > 60) haltdef
Quit would require a bit more work (in particular if you want to only hide the quit message from one channel when you have more than one common channel), but it should still be fairly efficient.