make a backup of all iOS devices to iTunes, encrypted. this will back up your keychains and allow them to be restored on a different device. and turn off iCloud keychain on every single device except the one with the current keys. and then add them all over again, and i think this resets your security code. but i dunno so then...
i think you might have to remove all devices from iCloud keychain, including the master device, but not erase the master devices keychain, and then turn on iCloud keychain again.
iCloud keychain only stores safari passwords, wifi passwords are not really kept around, but they are pushed