Mazda Motor Corporation has marked total production of 40m units in Japan with a ceremony at its Ujina Plant No. 2 near its headquarters in Hiroshima.