Melt butter in a large saucepan over medium heat. Add onions; cook until clear, about 5 minutes. Stir in ham and curry until curry is fragrant, 30 to 60 seconds. Add chicken broth, tomatoes, and barley. Bring to a boil; lower heat and simmer, covered, until barley is tender, 30 to 35 minutes. Add mushrooms and carrots and cook until tender, 10 to 15 minutes.