UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'pPG1oENXqvtJm16h9dpdpd0s5/+Qdd74B/vNdv9YZlk=' 
WHERE 
  key_id = 'e6fdcbb6315af0dabf66405e238093be0d2a106f33116a9ec9d56fb89da04f7c' 
  AND (
    token = 'pPG1oENXqvtJm16h9dpdpd0s5/+Qdd74B/vNdv9YZlk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00066