UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'TD3uq2IVGYSqUTvyrkTy6gaOdf+41HHggwjgDrPQQ/Y='
WHERE
key_id = '70fbfdda1a84493144a77283bc08cd663fa979522939dfb8d9b11513311bd79e'
AND (
token = 'TD3uq2IVGYSqUTvyrkTy6gaOdf+41HHggwjgDrPQQ/Y='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)