UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Usyf42/yJn5yNA7g9n5tXYyB2m/8bdVVyENM8hP1dQo=' 
WHERE 
  key_id = '70a9719268f37455ee32c18a85685c9dfc7bf3bc59eeb799f93f5ff9e20d7869' 
  AND (
    token = 'Usyf42/yJn5yNA7g9n5tXYyB2m/8bdVVyENM8hP1dQo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00039