Muhammad of Ghazni was sultan of the Ghaznavid Empire in 1030, and then later from 1040 to 1041