Carey hits Shield half-century against NSW