LPS-45728 Do not query the DB in a loop
LPS-45728 LAR export should only read data (with a very few exceptions, eg. last published date update)
LPS-45728 Move logic to an internal method - no changes yet
LPS-45728 Update last publish date upon transaction completition, so that export can remain a read-only transaction