UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Wu/2YaFG8Nv25S0gjoOUqPnCDH9vZ8sWnRY/T/DU8d4=' 
WHERE 
  key_id = '8784c32b02e5dedbc43e894b6ffb66f5064257f4c2b4606c0a74a5f67c84b9d4' 
  AND (
    token = 'Wu/2YaFG8Nv25S0gjoOUqPnCDH9vZ8sWnRY/T/DU8d4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020