Split homepage update query by statements.

Each query by itself is less likely to hit statement_timeout.
Adding .strip() to the queries enables searching through logs
with 'grep postgres duration' to see which queries are over 50ms.
First line of the query can be used for its identification.