45 min layover in CDMX

Ill be flying from Puerto Escondido to Tijuana with a 45 min layover in Mexico City in July. Is this enough time between flights? Or should I play it safe and get the 2 hr 45 min layover?