Source
gpg --edit-key KEYIDIn the GPG prompt:
gpg> expireNow choose a new expiry date (e.g. 2y for 2 years)
Optionally, do this for all subkeys (the primary key is 0):
gpg> key 1
gpg> key 2
...
gpg> expireSince the key has changed it needs to be trusted again:
gpg> trustFinally, save the changes:
gpg> saveThen, export the key again and publish it to a key server.