def METHOD_NAME(token, token_expiry):
    """
    Validates if the supplied token is valid, and hasn't expired.
    :param token: Token to check
    :param token_expiry: When the token expires in seconds
    :return: True if token is valid, and user_id contained in token
    """
    entropy = current_app.secret_key if current_app.secret_key else "un1testingmode"
    serializer = URLSafeTimedSerializer(entropy)
    try:
        tokenised_user_id = serializer.loads(token, max_age=token_expiry)
    except SignatureExpired:
        current_app.logger.debug("Token has expired")
        return False, "ExpiredToken- Token has expired"
    except BadSignature:
        current_app.logger.debug("Bad Token Signature")
        return False, "BadSignature- Bad Token Signature"
    return True, tokenised_user_id