UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1Up8i8QpnZOXmJ6+fZpBMz5tfWJk4Q3Mpcq1714dA4A='
WHERE
key_id = '8bb82b00d4ea13bc0e16472700e33e2badaac949ead78eef3b1af4969fb0f83d'
AND (
token = '1Up8i8QpnZOXmJ6+fZpBMz5tfWJk4Q3Mpcq1714dA4A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)