I did a reboot without clearing the cache and the error disappeared. At least I THINK that's what fixed it.Not sure if it was a coincidence but I did a reboot after clearing the cache for Google play services and Google play store, tried to do the upgrade and it worked.