UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '8JGIzkyjoefR0a7GIGIiiriTTetsxqrQt8ePHKrcasQ='
WHERE
key_id = 'f0ed0998146bb92ea2221f6eb35cfdb7d04e83ce11abfbba717b8abe4d79e771'
AND (
token = '8JGIzkyjoefR0a7GIGIiiriTTetsxqrQt8ePHKrcasQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)