Mexican Spanish. I don't know if they also use that saying in other Spanish speaking countries besides Mexico. In Spanish it goes: "Si mi abuelita tuviera ruedas, sería bicicleta".
If your aunt had nuts she'd be your uncle
That has the same basic idea as the mustache version, but is pithier. I still prefer the surrealism of the bicycle.