Calculate total pay for hourly workers by multiplying regular hours by the base rate and adding overtime premiums for hours exceeding 40.