Can Altar of Memories be used when a token unit dies?
Yes, Altar of Memories can be used when a token unit dies.
According to Rule 179.1.d, "A token unit is a unit. It... can be chosen or otherwise affected by spells or abilities that choose or affect units." Since Altar of Memories triggers "When a friendly unit dies," and a token unit is a unit, the death of a friendly token unit satisfies the condition for the ability.
As noted in the FAQ regarding Altar of Memories, triggered abilities are added to the chain as pending when the inciting event (the unit dying) occurs, and they finalize during the next cleanup after the inciting event completes.