The printed timing window is “When you cast votes.”
Gila the Silvertongue is the Hacan commander. Resolve the ability only in that window, and only if any other printed conditions are met. The commander must be unlocked.
Prophecy of Kings component; use the cited printing.