UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'UxDiJ1X6UPxAvOGUXQ+oiGoQ88iHIoY6sj3L/2ztLJk='
WHERE
key_id = 'd860f25942be40ddcdbb906ab087becd2d00c06ad55bd08ce21f71e97b2d8816'
AND (
token = 'UxDiJ1X6UPxAvOGUXQ+oiGoQ88iHIoY6sj3L/2ztLJk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)