UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GVI8F9HbSSrYFzmxIwaTad0iC8+1WBG+VvmjzSIMB3o='
WHERE
key_id = '2c35a5b50d5b8edbc1878b3cb74c62890357def45d7c03ca87038a9db0169d3e'
AND (
token = 'GVI8F9HbSSrYFzmxIwaTad0iC8+1WBG+VvmjzSIMB3o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)