MySQL: How to update a field only if condition is true

MySQL:  update a field only if condition is true.Update a field only if condition is true in query

Using IF statement we can do this
For example :- If i want to update user level if user score is 500+
and if user join time in 24 hour

We can add multiple condtion in IF statement

UPDATE table SET level = IF(score > 500 AND  jointime (HOUR, jointime , ‘2018-06-27 16:27:54’) > 24 , USERNEWLEVEL , level) WHERE user_id = 5