Your Miami flight comes in just before the Madrid and Mexico flights so Immigrations should be wide open clear for you (hence quick). Of course, if your flight is late... but then maybe the other flights might be late... but then... a crapshoot. But I like your odds, if no hiccups OK even with bags. Better than OK without.
(Just a note. LIM security could care less about how much or how big you have, they just scan. So anyone running late can just take all their bags (as long as they fit through scanner opening) and then gate check.)