I canโt see where you set the lock. Itโs possible the lock was never set.
Discussion
Lock does get set, but apparently not fast enough if two requests come in concurrently :/
Big problem was app is running serverless, so requests can process at identical time before database actually records it ๐