UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'TQhPKPpnoeiZLPXHKEzalcS2UH2hXnWs01Iv3i2GBIE=' 
WHERE 
  key_id = '06267823b46a9e6f1bf660f788545ee311b8a6ddb89d3ae86557bc428d973e3f' 
  AND (
    token = 'TQhPKPpnoeiZLPXHKEzalcS2UH2hXnWs01Iv3i2GBIE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030