I haven't had this happen yet, but my understanding is that if you think the overflow is done you can sanitize the airlock and refill like normal. If it still seems to be overflowing, get yourself a sanitized blow off tube and let it droop into a bucket with some star san water in it.
Yeah, this happened to me a few weeks ago with a stout. I had a carboy cap laying around which was used to send a blowoff tube into a bucket of starsan. I took a sample the other day before kegging and all was well. I imagine you'd be okay cleaning and sanitizing your airlock to put back onto the carboy.
I quit trying to use air locks a few brews ago. Seems like there always getting clogged and making a big mess. I always use a blow off tube into a gallon jug with sanitizer.
seems like it would take care of 3 issues... plenty of place for the foam to blow; a good way of getting yeast for a starter and prevents the blow off liquid from being sucked back into the fermenter. I haven't done it yet but it looks like a good idea.