UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rMZ3/O0BYl1o4RyqxndtFdoAzkP3taiVUdXaKukOkBg='
WHERE
key_id = 'aed416e9c92d0abdf6481e711bb07465d79552aa7262975e3906e2b25c53fb95'
AND (
token = 'rMZ3/O0BYl1o4RyqxndtFdoAzkP3taiVUdXaKukOkBg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)