Lifetimes of atoms trapped in an optical lattice in proximity of a surface