Thank you very much. You just made my day!
This part solved my problem in Samuel Wood’s comment:
But, you don’t want to replace the hash, you only want to replace the = with a LIKE. So, search for meta_key = ‘locations_
instead. See how I left off the % there? Now you can find it and replace it. Simple.