UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '6yKrzV6gnzS1G+sLv0cejdmEk/o2JkbSsuQfzkSARZ4='
WHERE
key_id = '8be85e4ab088fc327ab4117e9e94844e33c2bdc478932ceaf0e1188e4d032a62'
AND (
token = '6yKrzV6gnzS1G+sLv0cejdmEk/o2JkbSsuQfzkSARZ4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)