<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update_kb_mapping(kb_name, old_key, key, value):
 """Update an existing kb mapping with key old_key with a new key and value. :param kb_name: the name of the kb where to insert the new value :param old_key: the key of the mapping in the kb :param key: the new key of the mapping :param value: the new value of the mapping """

    db.session.query(models.KnwKBRVAL).join(models.KnwKB) \
        .filter(models.KnwKB.name == kb_name,
                models.KnwKBRVAL.m_key == old_key) \
        .update({"m_key": key, "m_value": value}, synchronize_session=False)