appstreamcli: AppStream system cache was updated, but problems were found: Metadata files have errors: /var/cache/app-info/xmls/fwupd.xml

This requires a manual edit, due to a bug in a settings file for the fwupd package:

sudo apt install expat
xmlwf /var/cache/app-info/xmls/fwupd.xml
sudo vim /var/cache/app-info/xmls/fwupd.xml

Go to the line number given by xmlwf In my case I got

/var/cache/app-info/xmls/fwupd.xml:268:72: not well-formed (invalid token)

Replace the & character (on the line 268 in my case) with &

Then you can run update again:

sudo apt update