UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'nxZIjZBZQeeyN+dDv7VwEnPxpbED5FK28qRqhdKk96Y='
WHERE
key_id = '95cfb4d7337bd50cc69ca986cbdf59b31d0b83cfd6aac32188e981902b108fae'
AND (
token = 'nxZIjZBZQeeyN+dDv7VwEnPxpbED5FK28qRqhdKk96Y='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)