Restore Failed due to Key (plugin_name, key)=(discourse-data-explorer, q:-1) is duplicated

Should be PluginStoreRow, not PluginStore. Try this:

./launcher enter app
rails c
PluginStoreRow.where(plugin_name: 'discourse-data-explorer').delete_all

:warning: This will irreversibly delete all data-explorer data from your site