UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'oo3Uwv+ouHRCELaIe7KIl1jdY4Ae3RGbdppQz0PVuNc=' 
WHERE 
  key_id = 'd4c7035601926dfa758a4b6b673328d62366ab2f5f8278085245597b6d3967bc' 
  AND (
    token = 'oo3Uwv+ouHRCELaIe7KIl1jdY4Ae3RGbdppQz0PVuNc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00041