After the diacetyl rest, the beer should be completely finished. At that time, it can be lagered. You can lager in a carboy, or a keg. I rack to the keg, and begin lagering in the keg at 34 degrees.
It's totally normal for the beer to clear at 40 degrees- that's essentially a cold crash and lager yeast would be inactive at those temperatures, that's why it's important for the beer to be finished before lagering.