UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'sslK4c1B+TrYfLJycFmC7mWgWObbhT+/mf8WIhbrQmY=' 
WHERE 
  key_id = '98ab1a255ccce4a9387088ff26672b47a1c37f24b7ecc02b8919d18c5de289b4' 
  AND (
    token = 'sslK4c1B+TrYfLJycFmC7mWgWObbhT+/mf8WIhbrQmY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00078