Mean-field description of plastic flow in amorphous solids