Filter out expired messages

Fix the issue that Sqlalchemy did not filter out the expired
messages when listing & popping.

Closes-Bug: #1349213
Change-Id: I4d013a4bfd9e75a207fa5d2054f12e78d972eca6