Database

[{datetime:ISODate("2021-11-26T15:00:01.000+00:00"),owner_id:"INTERNAL",motor_id:23},{datetime:ISODate("2021-11-26T15:08:21.000+00:00"),owner_id:"INTERNAL",motor_id:24},{datetime:ISODate("2021-11-26T15:08:31.000+00:00"),owner_id:"INTERNAL",motor_id:25},{datetime:ISODate("2021-11-26T15:59:51.000+00:00"),owner_id:"INTERNAL",motor_id:26},{datetime:ISODate("2021-11-26T16:00:01.000+00:00"),owner_id:"INTERNAL",motor_id:27},{datetime:ISODate("2021-11-26T16:00:11.000+00:00"),owner_id:"INTERNAL",motor_id:28},{datetime:ISODate("2021-11-26T16:10:01.000+00:00"),owner_id:"INTERNAL",motor_id:29},{datetime:ISODate("2021-11-26T16:10:10.000+00:00"),owner_id:"INTERNAL",motor_id:30}]

Query

db.collection.aggregate([{$set:{datetimeParts:{$dateToParts:{date:"$datetime"}}}},{$match:{"datetimeParts.minute":0,"datetimeParts.second":{$lt:10}}},{$unset:"datetimeParts"}])

Result