CO depletion in ATLASGAL-selected high-mass clumps