UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ZYsuunxzEWizzCdXpgWPXftBgNQiD7M/A8DEj4ncouQ='
WHERE
key_id = '294ff69285bf6e81dc1b363dca15509c9c672a0831d7ae8b295a8b3b347377fe'
AND (
token = 'ZYsuunxzEWizzCdXpgWPXftBgNQiD7M/A8DEj4ncouQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)