add additional rows to the select statement, 'stime' is needed for the expire check
Merge pull request #8339 from owncloud/fix_unit_tests

fixing unit tests