how to replace the key.pem and cert.pem?

Thanks, but if I replace them with new keys - will the device IDs change - as they are generated off the certificate with a hash?