How do I edit serialized values in "config" and "key_value" tables?
Don't edit the serialized config, edit the config as YAML. Try for example
drush cedit
See other options (UI and command line) here: https://www.drupal.org/docs/configuration-management