Craft 3: Error "variable now does not exist"
You need to convert the DateTime object via Filter:
 now|date('U') 

or via function
now.format('U')

This will format the date as a UNIX timestamp which is sufficient for querying. MySQL datetime format will work too: date('Y-m-d H:i:s')
More info can be found in the upgrade documentation.