X-ray studies of thermally activated dynamics in artificial spin ices