UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'ptE/6x2RFlp2TTXNfTmgjwtlfh2X27xmsFUn4f1GwOQ=' 
WHERE 
  key_id = '03734a4bf380222041cb159d98f6c95fc4208cfe514dd5e53ce34d735b0cf71f' 
  AND (
    token = 'ptE/6x2RFlp2TTXNfTmgjwtlfh2X27xmsFUn4f1GwOQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018