UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '91Rru3RLKMyaaTZdvOK7WhCPtze12PnWnKk1joErQ2M='
WHERE
key_id = 'fb6f6676334d39ec9ff5a1f25dd61099bcbd9ee2d4e74611af48e97ef415a64c'
AND (
token = '91Rru3RLKMyaaTZdvOK7WhCPtze12PnWnKk1joErQ2M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)