Klarna Interview Question

How would you solve this concurrency problem.