Nope. You can change punishments without a law being ex post facto.
The Congress may alter penalties for unlawful acts committed on or after the date of the enactment of a law forbidding those acts, but not for unlawful acts committed prior to the date of the enactment of a law. The McCain-Kennedy (and successor) bills attempted to change the penalties for foreign nationals who were already de facto physically and unlawfully present within United States territory; the McCain-Kennedy (and successor) bills were and are by definition ex post facto laws.