The mass–concentration–redshift relation of cold dark matter haloes