def METHOD_NAME(payload: dict, compare_user_id: str) -> None:
    """Validate a refresh token payload and confirm it corresponds to the correct user."""
    user_id = payload.get("user_id")
    exp = payload.get("exp")
    token_type = payload.get("type")
    if not exp or not user_id or user_id != compare_user_id:
        raise HTTPException(status_code=HTTP_401_UNAUTHORIZED, detail="Invalid token")
    if not token_type or token_type != "refresh":
        raise HTTPException(status_code=HTTP_400_BAD_REQUEST, detail="Invalid token type")
    if datetime.utcnow() >= datetime.fromtimestamp(exp):
        raise HTTPException(status_code=HTTP_401_UNAUTHORIZED, detail="Token expired")