UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '7RIkqgExX4jFzg8hKfWDFY2l3sXejqiXDfKxjJvy3/g=' 
WHERE 
  key_id = '986b7b3caeab24e8af0a0e082a5b90464bd77943f3604594fd177af09bfb2fcb' 
  AND (
    token = '7RIkqgExX4jFzg8hKfWDFY2l3sXejqiXDfKxjJvy3/g=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00045