I used Wug's toolkit. You can get it from the Galaxy Nexus forums or XDA I'm sure. It will return you to stock to do it though, so backup anything you don't want to lose!
Just an update. I received the OTA on a stock, rooted, unlocked GNex. It downloaded but failed to install. I unrooted following that, and the update began again and worked that time. My bootloader remains unlocked.
I've been reading conflicting reports about this so I thought I'd ask; has anyone been able to receive the 4.0.4 OTA and successfully install it onto a Galaxy Nexus with an unlocked bootloader while also rooted?