def METHOD_NAME(expires_in, expires_on):
    if not expires_on and not expires_in:
        raise ValueError("Must specify either 'expires_on' or 'expires_in'.")
    if not expires_on:
        expires_on = time.time() + expires_in
    else:
        expires_in = expires_on - time.time()
        if expires_in < 1:
            raise ValueError("Token has already expired.")
    return expires_in, expires_on