UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ZqTw+OmRH20ou2A+0z5encLnYsjLKi+tkoROQtuuPrg='
WHERE
key_id = '028eb8bece7bc3a98b8f7a5de6bd34eff70fdbbf1c7a70ed7d40bce80bc85c9d'
AND (
token = 'ZqTw+OmRH20ou2A+0z5encLnYsjLKi+tkoROQtuuPrg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)