UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'kOz6vm2u2qRCBnj+k7vVFGNpCBh38ZnvZDn2+uQfmeI=' 
WHERE 
  key_id = '1adcbefb83eb0ca49c3c3b5bbb3815616bb4157b66ebb78d5a428348edf10959' 
  AND (
    token = 'kOz6vm2u2qRCBnj+k7vVFGNpCBh38ZnvZDn2+uQfmeI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028