Opportunistic Titans knock off 49ers