Attempt to get GAE lock for UIDL requests (#12211)

Also removing the overhead of creating a Date object just for getting a
timestamp in the otherwise touched areas of code.

Change-Id: Ic712c0ae26d22995ad332593dbb8a14dbec7fcd6