def METHOD_NAME(user_id, chat_id):
    with WARN_INSERTION_LOCK:
        if warned_user := SESSION.query(Warns).get((user_id, str(chat_id))):
            warned_user.num_warns = 0
            warned_user.reasons = ""
            SESSION.add(warned_user)
            SESSION.commit()
        SESSION.close()