UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PknmCOarmO3pnCeuoXG+wKUKtQe0KQ4qJTuZyj2iU/M='
WHERE
key_id = '833cb336a0c5b7c611af281809b06af81b6abfb5b38edf71a4b503ea8c3c80c3'
AND (
token = 'PknmCOarmO3pnCeuoXG+wKUKtQe0KQ4qJTuZyj2iU/M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)