UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+VuN+CE/F8C44FIhLHldZ8I7vmBG1P0KNxMMe2BobC0=' 
WHERE 
  key_id = '9abc35ff9e241a7becaeb90a68f8e96efb39ceb8148dd3ba415af5aa235ca5a8' 
  AND (
    token = '+VuN+CE/F8C44FIhLHldZ8I7vmBG1P0KNxMMe2BobC0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033