UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Z2GuARsh08hDV2/amOhgu+gDY1IzQUFUFaebfFHQ+8o='
WHERE
key_id = 'e93bbb36da999e8c8742f39543fbbf68dccdaf6e7fb38ff90268dc6fb6171a95'
AND (
token = 'Z2GuARsh08hDV2/amOhgu+gDY1IzQUFUFaebfFHQ+8o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)