UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FGWfT8u7z8KlxgHL7o5HvgvarUySyKwpXDXaxF6Jhno='
WHERE
key_id = '9b274a9aba9b6bd9a20d0f7a0ddeacff06d605dd7bfcccb75c1e25995d198903'
AND (
token = 'FGWfT8u7z8KlxgHL7o5HvgvarUySyKwpXDXaxF6Jhno='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)