In the solution of URL Shortening service system design of Groking the system design interview, author mentions that to solve the concurrency problem when there are multiple servers reading keys concurrently:
KGS can use two tables to store keys: one for keys that are not used yet, and one for all the used keys. As soon as KGS gives keys to one of the servers, it can move them to the used keys table. KGS can always keep some keys in memory so that it can quickly provide them whenever a server needs them. For simplicity, as soon as KGS loads some keys in memory, it can move them to the used keys table. This ensures each server gets unique keys.
What is the point of using 2 tables? Why don't we just remove the used key from the table when KGS give the key to the server?