Get time of last sync in database