Safer way to parse Key Value from Query string

We have a case where access_token has "=" in it, the split("=") approach was breaking it. this should work in all cases.