UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'KbNyr1CL1cQkQK/NbActnrGUhQkiFK5uwwwF+0/uIB4=' 
WHERE 
  key_id = '4c35e3afee54efae0ba238dafb6fbebca27910c9c16087cb3e4823e25b9dc2e1' 
  AND (
    token = 'KbNyr1CL1cQkQK/NbActnrGUhQkiFK5uwwwF+0/uIB4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033