Added function to update remote last_sync_time when sync is finished