This is not portable, and will break any storage layer that isn't MySQL. No-go IMO.

Instead, fetch the token and compare it after fetch?