audit_logging: add method to replace the object for a given key with a new object