main: increased default session lifetime up to 5 hours, db: added insert_on_duplicate_key_update()