Drain and rinse both types of bean. Peel and finely chop the onions and garlic.
Heat a little oil in a frying pan and fry the onions, garlic and thyme for 10 minutes until softened. Add the beans and fry for a further 5 minutes.
Spoon into a food processor and pulse briefly to form a rough paste. Transfer the bean mixture into a bowl and stir in the breadcrumbs, soy sauce and lemon juice.
Divide the mixture into equal portions and shape into burgers. Heat a little oil in a heavy based frying pan and fry the burgers in batches for 2-3 minutes on each side until golden and cooked through.
Drain the burgers on kitchen paper and keep warm while cooking the remainder.