settings – How can I make a persist property take effect without rebooting?

I am trying to switch from mtp,adb mode to mass_storage easily, preferably with a script. I can go to two different places in settings and toggle both things there. Or I can use setprop or echo to set it from the command line but that requires rebooting. As I was writing this question I thought to my self that I might be able to use ‘settings put’ but I could not find a key for USB computer connection. There was a key named “usb_mass_storage_enabled” but that key does not appear to control the USB connection.