UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'JZPuzAgFrYoDlc+BrvVt9O+IYFzHh+7fWO8F7VhZxRg=' 
WHERE 
  key_id = 'd8be9d05b65b866865c3292ec3f1b213aaa64ce2af84f1c1a9d2e64da93fdcf4' 
  AND (
    token = 'JZPuzAgFrYoDlc+BrvVt9O+IYFzHh+7fWO8F7VhZxRg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034