UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'r3nuzpMwJHdgVZIs5t28d3G0I26RwaRRR2jfDb8xD88='
WHERE
key_id = '8e2236106883cef1c700d0127fe8170a8e78ff0e1fb4f3d60e88e3fc2275f718'
AND (
token = 'r3nuzpMwJHdgVZIs5t28d3G0I26RwaRRR2jfDb8xD88='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)