UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'H5dX+ZH8TgWpGqA+xFR2FtTa6yDCHqWPMF27p1gzZjo='
WHERE
key_id = '11b0f86328014227a6f9495d7293cfd605fd96f7c93b5452c55bf4e82acad64e'
AND (
token = 'H5dX+ZH8TgWpGqA+xFR2FtTa6yDCHqWPMF27p1gzZjo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)