Prevent this from happening during update?

(Sorry, this is unsolicited advice and doesn’t answer your question… I’d suggest updating less often - not only will you have less of the unavoidable downtime, you’ll be less likely to update at a time when things are a bit broken. Personally I update when releases come out, but I also wait a day or so to give a chance for breakages to be fixed.)