UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '94PpHLB/o1x2i70SGwRx3LwHvT33U51S3B/YxK74ilE='
WHERE
key_id = '329727fa6bae7130be24d439bf06bd0c4e74a7cc959fba193f95b6ce697fb5f7'
AND (
token = '94PpHLB/o1x2i70SGwRx3LwHvT33U51S3B/YxK74ilE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)