UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LjYHdeSIWc0RKqQzaCS/WH/wEiE2oMvKRjzGjFk/ZsA='
WHERE
key_id = '4c9b2e7b74c678f5b9a577686400f644dfbde250ea7072c687dd72bfd738e42a'
AND (
token = 'LjYHdeSIWc0RKqQzaCS/WH/wEiE2oMvKRjzGjFk/ZsA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)