An East Lothian firefighter who dedicated more than four decades of his life to protecting his hometown has hung up his helmet for the final time.