Pr0 tip is to un-clip 5-10 seconds in advance of when you *might* need to. Keep your cleat in the pedal though and you can clip back in easily enough.
Also learning not to lean the bike the same way as the foot that remains clipped in is a sure fire way to avoid falling over. Putting pressure on that same leg in a bid to try and stay upright as you begin to fall just speeds the process up