UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/ak7SdNSuavLEpUGUkJ5F1PiImKq8mKLvdjzEeQ19Wk=' 
WHERE 
  key_id = '6c278c79d4ad11b733315e0c0d8c30250119d6a9e0f745dbbe9a3c3b7daf2564' 
  AND (
    token = '/ak7SdNSuavLEpUGUkJ5F1PiImKq8mKLvdjzEeQ19Wk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030