You don't root an updated phone. (The update is supposed to fail if the phone has ever been rooted, even if you unrooted it. Updating a phone that's been rooted could brick it, depending on what you did while rooted.
What do you do? If you're going to be able to reinstall TWRP after the update (or if the update installs with TWRP intact), make a TWRP backup. Only back up the data. (Uncheck the System box.) Then either unroot and update, if the update will work, or flash the stock ROM and update.
Reinstall TWRP if you have to and restore the data backup.
(It works - I've been playing "ROM of the hour" all last week, and after installing every ROM I restored my data, so the phone was still "my phone", just with a different ROM.) No TWRP? I don't think I want the phone, unless there's a SafeStrap for it [which is TWRP for locked bootloaders]. Without TWRP, the work that took me a week would have taken a week for each ROM, reinstalling all my apps, restoring all my backed up data, etc. With TWRP, a 5 minute data restore.)