The actual answer is this:
// Get the settings
$mothership_settings = variable_get('theme_mothership_settings', array());
// Set the variable
$mothership_settings['mothership_classes_view'] = 0;
// Save our settings
variable_set('theme_mothership_settings', $mothership_settings);
This is perfect for an update hook to run, and doesn't seem to (in my case) need a cache clear afterwards.
This can be abstracted to any theme, Drupal stores the settings in the theme_THEMENAME_settings variable. As Pierre mentions, you can also do this in the .info file of the theme but this is only a good idea when you are extending a base theme (as you don't want to overwrite contrib .info files).