The problem is that the way it is setup you will never target the things you want to target. Here is what it is doing now.
Synopsis of Automator Action:
When items are added to ~/Downloads take those added items and return only items with the extension dmg and that have not been opened in the last day, move the items that meet these criteria to the trash.
The Problem:
The problem is that you are only targeting items that are added to the downloads folder, not items that would also match the criteria of having been opened a day ago because those items aren't being passed through the folder action. In others words, the dmgs that have been in your downloads folder for the last few days and haven't been opened aren't touched by the action because the action only receives newly added items.
Now, technically, there should be some dmgs that get filtered, as when they are downloaded many come with a date last opened that is far in the past (unless Safari is mounting them automatically).
What you should do instead:
What you want to do is utilize scheduled tasks. This can be done in a number of ways, the easiest way would be iCal but you can also use launchd.
In iCal you can attach scripts and other things to be run at a certain time. In this case, you would want to create an Application in Automator and have iCal open the application you created.
Here is a new sample action that should get you started.
Alternative:
You could simply attach the action I have shown here to the folder, that way it is filtering existing finder items, but it will only be run when new items are added to the folder.
If you chose this route, you would need to create a Folder Action, and not an Application. However, you wouldn't need to pass the input (the added items) to the workflow, so you could break the connection although leaving won't do any harm.
Take into consideration what I mentioned above, downloaded DMGs, unless automatically mounted by Safari may have a "Last opened" date that meets your criteria and as such they may be trashed.