'Update a credential and write the multistore.
This must be called when the multistore is locked.
Args:
cred: The OAuth2Credential to update/set
scope: The scope(s) that this credential covers'

def _update_credential(self, cred, scope):

    key = (cred.client_id, cred.user_agent, scope)
    self._data[key] = cred
    self._write()
