What a stupid thing of me to miss
UNIX_TIMESTAMP() for time comparison, oops