UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'zuLxqkWYsKSEtrWhZdhntSsUWXB3yJxieQ09wpIJpdo=' 
WHERE 
  key_id = '457071851cf6ca401c3c60315114cdd64ba14ef3a64d5732b8707d7667ba75ba' 
  AND (
    token = 'zuLxqkWYsKSEtrWhZdhntSsUWXB3yJxieQ09wpIJpdo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028