def insert_token(conn, token):
    """inserts a token in the database

    Args:
        token (str): token that will be stored in database

    Returns:
        status (bool): will return False in case of non-unique token is attempted
    """

    try:
        sql = f"""INSERT INTO tokens(token) 
                  VALUES('{token}')"""
        c = conn.cursor()
        c.execute(sql)
        conn.commit()
        return True
    except Exception as e:
        # print(e)
        if "UNIQUE constraint failed" in str(e):
            return False