Mysql updates part of the data in batches (and avoids non-repetition)

which is faster, please?
A:

UPDATE vehicle     
        SET driveMileage= CASE vin 
            WHEN "LMVXXXXXX1" THEN 3434 
            WHEN "LMVXXXXXX2" THEN 4345 
            WHEN "LMVXXXXXX3" THEN 5334 
            
            WHEN "LMV9999999" THEN 5333 
        END, 
        updateDatetime= CASE vin 
            WHEN "LMVXXXXXX1" THEN "New Title 1"
            WHEN "LMVXXXXXX2" THEN "New Title 2"
            WHEN "LMVXXXXXX3" THEN "New Title 3"
            
            WHEN "LMV9999999" THEN 5333 
        END
    WHERE vin IN (1,2,3,,9999999)

B:
add "AND state! = "ok"" at the end of A.

An is to update two fields in 1 million rows of data, and B is to add a judgment condition.

Jan.15,2022

if state is not indexed or state is indexed but the cardinality is too small, then it is just as fast, because it is all full table scans

.

if ps: is wrong, please give me some advice

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b36fe9-2c065.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b36fe9-2c065.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?