Ok, cb_config table has name and value fields. Name is name of settings, val is string or serialized array/object for given setting.
If you are changing simple text value then it is easy.
Serialized array is used when setting has different values for each locale. Then multidimensional array used where keys are language id.
Serialized object is used for storing theme settings.
In any case if you change database settings from external program you may have to clear cache from admin panel of your website because config settings are stored in cache for 1 hour. Cache is automatically cleared if you change config from admin panel.