Whisk the egg with the cabbage, carrot, scallion, and a pinch of salt in a small bowl.
Heat a flat griddle or nonstick pan over medium heat. Butter one side of each bread slice and set them aside, butter side out.
Pour the egg mixture into the pan in a rough rectangle roughly the size of your bread slice. Don't stir it once it's poured — you want one solid patty, not scrambled egg.
Cook undisturbed for about 2 minutes, until the bottom is golden and the top is mostly set, then flip carefully with a wide spatula.
If using ham and cheese, lay them on top of the patty now, off to one side of the pan, so the cheese starts to soften.
Toast the bread slices, buttered side down, in the same pan (or a separate dry pan) until golden, about 1 to 2 minutes per side.
Slide the egg patty (with ham and cheese, if using) onto one slice of toast.
Spread ketchup on the other slice, and if you're doing it the traditional way, sprinkle a little sugar directly onto the egg patty before closing the sandwich.
Close the sandwich, press down gently, and cut in half to serve while it's still hot.