It is not advised to have a self modifying configuration value in your data model as this will cause problem for service orchestration software to stay synchronized with your device, unless this is hidden from the northbound interfaces, such as NETCONF.
You can use the MAAPI interface to write configuration data into CDB. Take a look at examples.confd/misc/maapi_cli in your ConfD distribution for example code of how to work with MAAPI. You will want to perform the write operation outside of your CDB subscription code to prevent any deadlock situation. You will also need to take care to note the difference in your subscriber code between the end user making the change through the northbound interfaces versus the changes made through MAAPI.