Grind the sesame seeds and cashews in a mortar, then mix them with the chili powder, grated ginger, vegetable oil, lime juice, miso paste and soy sauce.
Fry the resulting paste in a dry pan for about 2 minutes; the extra paste keeps in a glass jar in the refrigerator.
Slice the tofu and fry it in a little vegetable oil until golden brown; slice the carrot, mushrooms and corn and stew them for 2 minutes.
When the mushrooms and vegetables start to release their moisture, add 2 tbsp of the tom yam paste and braise for another 5 minutes.
Pour in the boiling water, add the kaffir lime leaves and bring to a boil, then reduce the heat. Chop the lemongrass stalks and add them to the soup.
Add the soy sauce, cherry tomatoes and coconut milk and cook for another 5 minutes over low heat.
Add the fried tofu and lime juice, and serve the soup garnished with fresh cilantro.