InfluxDB as an example (taken from here):
1. Obtain and verify the new key :
wget -q https://repos.influxdata.com/influxdata-archive_compat.key
gpg --with-fingerprint --show-keys ./influxdata-archive_compat.key
2. Install the new key:
cat influxdata-archive_compat.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg > /dev/null
3. Update your APT sources to use the new key:
echo 'deb [signed-by=/etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg] https://repos.influxdata.com/debian stable main' | sudo tee /etc/apt/sources.list.d/influxdata.list
4. Cleanup the old key:
sudo rm -f /etc/apt/trusted.gpg.d/influxdb.gpg