The commands do not work with vCSA 8 (8.0U2 at least), there's no vc user password anymore in /etc/vmware-vpx/vcdb.properties.
But luckily it works with the postgres user - without needing a password
/opt/vmware/vpostgres/current/bin/psql -U postgres -c "SELECT dns_name, endorsement_key, attestation_identity_key FROM vpx_host WHERE dns_name = 'esx01.domain.tld';" -d VCDB
Also, the two keys need to be replaced with '' (nothing), it doesn't work with a space between the single quotation marks:
/opt/vmware/vpostgres/current/bin/psql -U postgres -c "UPDATE vpx_host SET endorsement_key='', attestation_identity_key='' WHERE dns_name = 'esx01.domain.tld';" -d VCDB
A host reboot is needed afterwards, and TPM attestation should be back to "Passed":