Grand Ayatollah Sayyid Khamenei (may God protect him):
In general, if someone spends the khums money on their necessities after receiving their first income, they are allowed to exclude that amount from their annual profits when the time for their khums year arrives.