(Ibid. 34:20) "And the firstling of an ass you shall redeem": What is the intent of this? From (Numbers 18:15) "but redeem shall you redeem the first-born of the man, and the first-born of the unclean beast," I might think that every unclean beast is understood. It is, therefore, written (Exodus 13:13) "and every firstling of an ass you shall redeem with a lamb." It is an ass that you redeem, and not the firstling of other unclean beasts.
The Torah Mentions Redeeming the First-born of the Unclean Beast in
Mekhilta Tractate Pischa 18:13