Fix the workers waiting for new request to arrive to the queue.
Create a new transaction when the old one has been used.
Change the insertion statement to use an update is old data is present.