UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'SMWvlOKixsTT8nQRXoKkNUi/k/R/sq/9WO7MrU8C/kw='
WHERE
key_id = '2844b5c97b99b5ce962beccb1ff3829bf0fa66c0e2b65b387d127cda08f86cce'
AND (
token = 'SMWvlOKixsTT8nQRXoKkNUi/k/R/sq/9WO7MrU8C/kw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)