def METHOD_NAME(self, cached_data, update_period) -> bool:
    """
    Returns True if
    - no asn data is found in the db OR ip has no cached info
    - OR a month has passed since we last updated asn info in the db
    :param cached_data: ip cached info from the database, dict
    """
    try:
        return (time.time() - cached_data['asn']['timestamp']) > update_period
    except (KeyError, TypeError):
        # no there's no cached asn info,or no timestamp, or cached_data is None
        # we should update
        return True