Updates public key if exists.