update t set user_order = case when id = 123 then 500 else user_order + 1 end where id = 123 or user_order >= 500;