UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'GOeJMo8e2sAzcUlSCzw/MsE2R37p9H0H/8tF689rwWE=' 
WHERE 
  key_id = 'be76b5b24ef8cd1bfd3dab1ac2f8a7d32882469d1bfbe2f3db613715aa5dadae' 
  AND (
    token = 'GOeJMo8e2sAzcUlSCzw/MsE2R37p9H0H/8tF689rwWE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033