You do NOT need to apply for a visa before traveling to Mexico if:
We knew, if you hold a current residency visa or permit for the United States of America, Canada, Japan, the United Kingdom, or any country that is signatory to the European Schengen Area.
For citizens of Russia, Ukraine and Turkey
The Electronic Authorization System (SAE) is an online system, which allows citizens of RUssia, Ukraine and Turkey travelling by air to obtain an electronic authorization to travel to Mexico for transit, tourism or business purposes without a consular visa. It is valid for 30 days and a single entry and upon arrival visitors are authorized to stay in Mexico as tourists for up to 180 days.
From May 2016:
Also, if you hold a current visitor visa for the United States of America, Canada, Japan, the UK or the Schengen area, you do NOT need to apply for a Mexican visa.