The following signatures were invalid: KEYEXPIRED 1587841717 KEYEXPIRED 1668891673

Debian Jessie is expired. Update to a new OS.
If you cannot do this, there is a workaround with the freexian LTS repo.

wget https://deb.freexian.com/extended-lts/pool/main/f/freexian-archive-keyring/freexian-archive-keyring_2022.06.08_all.deb && sudo dpkg -i freexian-archive-keyring_2022.06.08_all.deb

After this, comment out all your sources in /etc/apt/sources.list and only use:

deb http://deb.freexian.com/extended-lts jessie main contrib non-free

Then apt update && apt upgrade should work again.

Source: https://unix.stackexchange.com/a/744587