UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'yim2PITa8J0xc1O9nF7X5yK7mHW74H06DSb4d0xUDy4='
WHERE
key_id = '934aac008f669e709213959e360294487455d9ab61f11d8529c147018846f275'
AND (
token = 'yim2PITa8J0xc1O9nF7X5yK7mHW74H06DSb4d0xUDy4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)