UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4u4ZjPzBtYPhcTkoCLF9CP1XCkVwcW6L2eRraPDkZLg='
WHERE
key_id = '2246c7eef079ed4e869bc41a2ac02a0a8e6faba57e3b41b668aae170484a773c'
AND (
token = '4u4ZjPzBtYPhcTkoCLF9CP1XCkVwcW6L2eRraPDkZLg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)