Emergent Herschel-Bulkley rheology from mesoscopic simulations of flowing soft-glassy materials