UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'QVQdyDjqMpNfBYJwZ7IFRP4CeI/HTbecb1AKWr7Dfwk=' 
WHERE 
  key_id = 'ccb72e62d5cba4b784c261b01eedcfc18d1f12ae4194a201380e8140ca46e269' 
  AND (
    token = 'QVQdyDjqMpNfBYJwZ7IFRP4CeI/HTbecb1AKWr7Dfwk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00026