UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'LoSoHBW3U1/1VlJpvhHGZogzBaVEW9bFc9jfNYJEBcQ=' 
WHERE 
  key_id = '4ceaa83dfb54cfa77ab42fdaa0919ca380913a7fa4e26f5ce3d7fdf9e5c5271e' 
  AND (
    token = 'LoSoHBW3U1/1VlJpvhHGZogzBaVEW9bFc9jfNYJEBcQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033