If you change your site's domain, the specific sql that you can run to fix your templates and (separately) your existing messages (e.g. those in progress or in case you want to copy them):
From "olddomain.org" to "newdomain.org":
update civicrm_mosaico_template set metadata = replace(metadata,'olddomain.org','newdomain.org');
update civicrm_mailing set template_options = replace(template_options,'olddomain.org','newdomain.org');
If your old/new domains share some parts (e.g. you're going from domain.org to www.domain.org) you'll want to be careful not to run it more than once and it may mess up something else.
If you're also changing the protocol (http to https), then it's a bit tricky because the template_options field is in json notation with "/" escaped. You could do it in a separate step, replacing 'http' with 'https' for example.
There's an open issue here: https://github.com/veda-consulting/uk.co.vedaconsulting.mosaico/issues/87 to try and fix it.