UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'xXccCLw9wYHl8mJ0u9vl4giWxZ0JrfM0oGvyH1Dfyus=' 
WHERE 
  key_id = 'c3e6b1d7c76fb24da8046e2a0a96aba31eaa5c47cd3409fdcd4fcbca00d1180b' 
  AND (
    token = 'xXccCLw9wYHl8mJ0u9vl4giWxZ0JrfM0oGvyH1Dfyus=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00043