UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1luBaOqPxXLzJHrVsTv+5y4t/4UmAMuA1BSbfPO2DQQ='
WHERE
key_id = '79c42786a64b11359fe6dfd819ab7675eb8def187fedc1da184f4e3896f53e6c'
AND (
token = '1luBaOqPxXLzJHrVsTv+5y4t/4UmAMuA1BSbfPO2DQQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)