import time


def is_token_expired(token_line):
    """
    Checks if the token in the file is expired, when using the TTL based.

    :returns: True if the token is expired, otherwise False
    """
    if "|" in token_line:
        expiry = token_line.strip().split('|')[1]
        if int(round(time.time())) > int(expiry):
            return True

    return False