MySQL Error!

Date: [19:38:18] 23.03.2019 +0300

MySQL:
Query:                 select * from ds_stories as g where status=1 and (UNIX_TIMESTAMP(date)> or (UNIX_TIMESTAMP(date)>= and id<)) order by UNIX_TIMESTAMP(date) asc, id asc limit 3
mysql_error():         You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'or (UNIX_TIMESTAMP(date)>= and id<)) order by UNIX_TIMESTAMP(date) asc, id asc l' at line 1
mysql_errno():         1064
mysql_server_info():   5.6.36-82.0

Script:
SCRIPT_FILELINE:       /var/www/www-root/data/www/lachance.ru/modules/stories.inc.php:86
SCRIPT_FILENAME:       /var/www/www-root/data/www/lachance.ru/index.php

Request:
REQUEST_URI:           /stories/ekaterina-19032018
QUERY_STRING:          module=stories&id=ekaterina-19032018
HTTP_REFERER:          
HTTP_HOST:             www.lachance.ru
REQUEST_METHOD:        GET

Server:
SERVER_SOFTWARE:       Apache/2.2.15 (CentOS)
SERVER_PORT:           443
SERVER_NAME:           www.lachance.ru

User:
HTTP_USER_AGENT:       CCBot/2.0 (https://commoncrawl.org/faq/)
REMOTE_ADDR:           54.196.208.187
REMOTE_PORT:           45480