Magnetic black holes with higher-order curvature and gauge corrections in even dimensions