Update duplicate checkin & checkout; add query