I'm no MySQL guru so I can't say for sure if it will work or not (but I suspect it won't). The simplest way to find out though would be to try it.
If it doesn't work, I suggest you check to see if either of two sets of conditions are true first, and if so, then update your db.